package cn.lix.sc.rpc.oauth2.service.impl;

import cn.lix.sc.rpc.oauth2.dao.TbUserDao;
import cn.lix.sc.rpc.oauth2.entity.TbUser;
import cn.lix.sc.rpc.oauth2.service.TbUserService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * 用户表(TbUser)表服务实现类
 *
 * @author makejava
 * @since 2021-05-13 22:25:51
 */
@Service("tbUserService")
public class TbUserServiceImpl extends ServiceImpl<TbUserDao, TbUser> implements TbUserService {

    @Override
    public TbUser getByName(String name) {
        return this.getOne(new LambdaQueryWrapper<TbUser>().eq(TbUser::getUsername, name));
    }

}
